package com.sq.partner.manager.dao.impl;
import com.sq.partner.manager.dao.ClaimDemageDao;
import com.sq.partner.manager.mybatis.model.ClaimDemage;
import com.sq.partner.manager.util.Page;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;

@Repository
public class ClaimDemageDaoImpl extends BaseDaoImpl implements ClaimDemageDao {
    @Override
    public Page queryClaimDemageByCondition(Page page) throws Exception {
        Map<String,Object> map = (Map<String, Object>) page.getType();
        page.setTotal((Integer)this.query("queryCount2ByMap", map));
        List<ClaimDemage> list = queryList("queryClaimDemageByCondition", map);
        page.setData(list);
        return page;
    }

    @Override
    public Page queryClaimDemageAll(Page page) throws Exception {
        Map<String,Object> map = (Map<String, Object>) page.getType();
        page.setTotal((Integer)this.query("queryCount2ByMap", map));
        List<ClaimDemage> list = queryList("queryClaimDemageAll", map);
        page.setData(list);
        return page;
    }
}
